SQL statement implementation, SQL Server 2000 and access copy the oldtable structure of the old table, or structure and content to the new table newtable
Both of them have been tried. The following code can be used in both databases (SQL Server 2000
This section describes the SQL statements used to copy a table from an Oracle database, including the SQL statements used to copy the table structure. And how to copy the structure of the relevant table and copy the data SQL in the table. The
SQL Copy data table (SELECT * into and insert INTO)
SELECT * into target table name from source table name Insert into target table name (Fld1, fld2) Select Fld1, 5 from source table name The above two sentences are to insert the
To summarize the methods of copying tables and knots first
One, CREATE TABLE method
Whole table copy: CREATE table new Table select * from old table;
Structure copy: 1, CREATE table new table select * from old table where 1<>1;
One, copy table
CREATE TABLE as SELECT * FROM and insert to select from two table copy statement differences[SQL]View PlainCopy
Create table targer_table as select * from source_table
INSERT INTO target_table (column1,column2) select Column1,column2
SELECT * into target table name from source table nameINSERT into target table name (Fld1, fld2) Select Fld1, 5 from source table nameThe above two sentences are to insert the source table data into the target table , but the two sentences are
Transfer from csdnhttp://blog.csdn.net/johnny_depp/article/details/21791531. Copy table structure and data to a new tableCREATE table new Table SELECT * from old table2. Copy the table structure to the new table onlyCREATE table new Table SELECT *
1. Copy table definition
Assume that we have a data table "person" with five columns: ID, firstname, lastname, weight, and height. you can refer to this article for the table structure. Now we want to create a new table named "people". The table
Difference between SQL Server table variables and temporary tables (Supplement), SQL Server
I. Table Variables
Table variables are introduced in SQL Server 2000 for the first time. Table variables include column definitions, column names, data types,
Document directory
MySQL table replication
MySQL table modification
Delete a MySQL table
I didn't want to write this section, because it was very troublesome. There were many examples, which were representative, and I knew everyone was bored.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.